﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/01ADMINISTRADOR/MPAdmin.Master" CodeBehind="admin-grupo-teorico.aspx.vb" Inherits="ASI_2_UFG.admin_grupo_teorico" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="tableform">
        <fieldset>
            <legend>Administrar Grupo Teorico</legend>
        </fieldset>
        <table>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="ID GRUPO TEORICO"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtid_grupo_teorico" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="ID MATERIA"></asp:Label></td>
                <td>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT [id_materia], [nombre] FROM [MATERIA]"></asp:SqlDataSource>
                    <asp:DropDownList ID="dropid_materia" runat="server" 
                        DataSourceID="SqlDataSource2" DataTextField="nombre" 
                        DataValueField="id_materia">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="ID PERSONAL"></asp:Label></td>
                <td>
                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT id_personal, { fn CONCAT(nombres, apellidos) } AS NOMBRES FROM PERSONAL"></asp:SqlDataSource>
                    <asp:DropDownList ID="dropid_personal" runat="server" 
                        DataSourceID="SqlDataSource3" DataTextField="NOMBRES" 
                        DataValueField="id_personal">
                    </asp:DropDownList>
                </td>                    
            </tr>
            <tr>
                <td colspan="2">
                    <asp:ImageButton ID="btninsertar" runat="server" 
                        ImageUrl="~/IMAGES/funct_add.png" CssClass="image" />
                    <asp:ImageButton ID="btnModificar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_refresh.png" />
                    <asp:ImageButton ID="btnEliminar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_delete.png" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lbmensaje" runat="server" Text=""></asp:Label></td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT [id_grupo_teorico], [id_materia], [id_personal] FROM [GRUPO_TEORICO]">
                    </asp:SqlDataSource>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        CellPadding="4" DataKeyNames="id_grupo_teorico" DataSourceID="SqlDataSource1" 
                        ForeColor="#333333" GridLines="None">
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="id_grupo_teorico" HeaderText="id_grupo_teorico" 
                                InsertVisible="False" ReadOnly="True" SortExpression="id_grupo_teorico" />
                            <asp:BoundField DataField="id_materia" HeaderText="id_materia" 
                                SortExpression="id_materia" />
                            <asp:BoundField DataField="id_personal" HeaderText="id_personal" 
                                SortExpression="id_personal" />
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
